<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>SdFat: DigitalPin&lt; PinNumber &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SdFat
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_digital_pin-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DigitalPin&lt; PinNumber &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__digital_pin.html">Fast Pin I/O</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Fast digital port I/O.  
 <a href="class_digital_pin.html#details">More...</a></p>

<p><code>#include &lt;DigitalPin.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa6e07eea6e152d47c6f0d232bed9c45e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#aa6e07eea6e152d47c6f0d232bed9c45e">config</a> (uint8_t <a class="el" href="class_digital_pin.html#afe1550df47980934061d5578ec1fd644">mode</a>, bool level)</td></tr>
<tr class="separator:aa6e07eea6e152d47c6f0d232bed9c45e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab68480b09df5c4794c95cdf2230d4c55"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#ab68480b09df5c4794c95cdf2230d4c55">DigitalPin</a> ()</td></tr>
<tr class="separator:ab68480b09df5c4794c95cdf2230d4c55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add1677ecf4c7dc3c12effd39c1db34ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#add1677ecf4c7dc3c12effd39c1db34ed">high</a> ()</td></tr>
<tr class="separator:add1677ecf4c7dc3c12effd39c1db34ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb6a3f66fb3f9fb9ec8233bdb18aa6eb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#aeb6a3f66fb3f9fb9ec8233bdb18aa6eb">low</a> ()</td></tr>
<tr class="separator:aeb6a3f66fb3f9fb9ec8233bdb18aa6eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe1550df47980934061d5578ec1fd644"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#afe1550df47980934061d5578ec1fd644">mode</a> (uint8_t mode)</td></tr>
<tr class="separator:afe1550df47980934061d5578ec1fd644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab609c911b4a672e4d382260fc1fdd266"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#ab609c911b4a672e4d382260fc1fdd266">operator bool</a> () const </td></tr>
<tr class="separator:ab609c911b4a672e4d382260fc1fdd266"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbc9c84602246497a1dbe011e9339cc0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_digital_pin.html">DigitalPin</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#adbc9c84602246497a1dbe011e9339cc0">operator=</a> (bool value)</td></tr>
<tr class="separator:adbc9c84602246497a1dbe011e9339cc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55e344551ca86f8acd489aac277c9961"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#a55e344551ca86f8acd489aac277c9961">read</a> () const </td></tr>
<tr class="separator:a55e344551ca86f8acd489aac277c9961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2109c522836448cd6dfd576c1b5a5a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#ab2109c522836448cd6dfd576c1b5a5a0">toggle</a> ()</td></tr>
<tr class="separator:ab2109c522836448cd6dfd576c1b5a5a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08b7eee5165c5055bd0bbbda491bdfff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_digital_pin.html#a08b7eee5165c5055bd0bbbda491bdfff">write</a> (bool value)</td></tr>
<tr class="separator:a08b7eee5165c5055bd0bbbda491bdfff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;uint8_t PinNumber&gt;<br />
class DigitalPin&lt; PinNumber &gt;</h3>

<p>Fast digital port I/O. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab68480b09df5c4794c95cdf2230d4c55"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::<a class="el" href="class_digital_pin.html">DigitalPin</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa6e07eea6e152d47c6f0d232bed9c45e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::config </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set pin configuration. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>INPUT or OUTPUT. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>If mode is OUTPUT, set level high/low. If mode is INPUT, enable or disable the pin's 20K pullup. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="add1677ecf4c7dc3c12effd39c1db34ed"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::high </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set pin level high if output mode or enable 20K pullup if input mode. </p>

</div>
</div>
<a class="anchor" id="aeb6a3f66fb3f9fb9ec8233bdb18aa6eb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::low </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set pin level low if output mode or disable 20K pullup if input mode. </p>

</div>
</div>
<a class="anchor" id="afe1550df47980934061d5578ec1fd644"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::mode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set pin mode. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>INPUT, OUTPUT, or INPUT_PULLUP.</td></tr>
  </table>
  </dd>
</dl>
<p>The internal pullup resistors will be enabled if mode is INPUT_PULLUP and disabled if the mode is INPUT. </p>

</div>
</div>
<a class="anchor" id="ab609c911b4a672e4d382260fc1fdd266"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::operator bool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Parenthesis operator. </p><dl class="section return"><dt>Returns</dt><dd>Pin's level </dd></dl>

</div>
</div>
<a class="anchor" id="adbc9c84602246497a1dbe011e9339cc0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_digital_pin.html">DigitalPin</a>&amp; <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Asignment operator. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>If true set the pin's level high else set the pin's level low.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This <a class="el" href="class_digital_pin.html" title="Fast digital port I/O. ">DigitalPin</a> instance. </dd></dl>

</div>
</div>
<a class="anchor" id="a55e344551ca86f8acd489aac277c9961"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Pin's level. </dd></dl>

</div>
</div>
<a class="anchor" id="ab2109c522836448cd6dfd576c1b5a5a0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::toggle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Toggle a pin.</p>
<p>If the pin is in output mode toggle the pin's level. If the pin is in input mode toggle the state of the 20K pullup. </p>

</div>
</div>
<a class="anchor" id="a08b7eee5165c5055bd0bbbda491bdfff"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t PinNumber&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_digital_pin.html">DigitalPin</a>&lt; PinNumber &gt;::write </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Write the pin's level. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>If true set the pin's level high else set the pin's level low. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Arduino/libraries/SdFat/src/SdSpiCard/<a class="el" href="_digital_pin_8h.html">DigitalPin.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 19 2016 06:31:51 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
